﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using DAL;
using BLL;
using Model;
using Newtonsoft.Json;

namespace EstateappraisalApi.Controllers
{
    /// <summary>
    /// 字典
    /// </summary>
    public class DictionaryController : ApiController
    {
        DictionaryBLL bll = new DictionaryBLL();

        // GET api/dictionary
        public IEnumerable<Dictionary> Get()
        {
            return bll.ShowDictionary();
        }

        // GET api/dictionary/5
        public string Get(string Dictionary_Type)
        {
            var s=bll.ShowDictionary(Dictionary_Type);
            return JsonConvert.SerializeObject(s);
        }

        // POST api/dictionary
        public void Post([FromBody]string value)
        {
        }

        // PUT api/dictionary/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE api/dictionary/5
        public void Delete(int id)
        {
        }
    }
}
